package com.eogo.item.service.impl;

import com.eogo.item.mapper.ProductMapper;
import com.eogo.item.pojo.Product;
import com.eogo.item.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;

@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductMapper productMapper;

    @Override
    public void inserProduct(Product product) {
        product.setCreateTime(new Date());
        product.setSellNum(0);
        productMapper.insert(product);
    }
}
